package connection.request;

import connection.authorization.AuthorizationData;
import connection.commands.BaseCommand;
import java.io.ObjectOutputStream;

/**
 * A class representing a single user commands.<br>
 * <br>
 *
 * @author Mihail A. Muhin
 */
public class Request {
  private AuthorizationData adata = null;
  private BaseCommand cdata = null;

  public Request() {
  }

  public Request(AuthorizationData adata, BaseCommand cdata) {
    this.adata = adata;
    this.cdata = cdata;
  }

  public BaseCommand getCdata() {
    return cdata;
  }

  public AuthorizationData getAdata() {
    return adata;
  }

  public void write(ObjectOutputStream oos) {
    adata.write(oos);
    cdata.write(oos);
  }
}
